{-# OPTIONS_GHC -fglasgow-exts #-}
module Hixay.UI.Tools where
import Graphics.UI.WX

refresh_ :: forall w. (Dimensions w) => w -> IO ()
refresh_ p =
    -- I didn't find another way to repaint correctly
    get p clientSize >>= \(Size a b) -> set p [clientSize := Size a (b-1)] >> set p [clientSize := Size a b]

mkRow :: forall w. (Widget w) => String -> w -> [Layout]
mkRow sl te = [alignLeft $ label $ sl ++ ":", hfill $ widget te]

